<%@ taglib prefix="sp" uri="http://www.springframework.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="container" id="bootomFooter" style="display: none; z-index: -10000">
    <hr>
    <div class="row" style="margin: 8px auto 5px auto;">
        <div id="bootomFooterBox">
            <span><sp:message code="label.copyright"/> </a></span>
        </div>
    </div>
</div>
<script>

    var getMobileOperatingSystem = function () {
        var userAgent = navigator.userAgent || navigator.vendor || window.opera;

        if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {
            return 'iOS';

        }
        else if (userAgent.match(/Android/i)) {

            return 'Android';
        }
        else {
            return 'unknown';
        }
    };

    document.addEventListener('DOMContentLoaded', function () {
        console.info('include-footer.jsp loaded');
        var DOMbootomFooter = document.getElementById('bootomFooter');
        setTimeout(function () {
//            console.log('include-footer.jsp show');
            DOMbootomFooter.style.display = 'block';
            DOMbootomFooter.className = 'animated fadeIn';
        }, 1200);


        if (getMobileOperatingSystem() === 'Android') {

            //注册onFocusDoclearFooter
            var DOMonFocusDoclearFooters = document.getElementsByTagName('input');
            if (DOMonFocusDoclearFooters && DOMonFocusDoclearFooters.length > 0) {
                for (var idx = 0; idx < DOMonFocusDoclearFooters.length; idx++) {
                    var item = DOMonFocusDoclearFooters[idx];

                    item.addEventListener('focus', function () {
                        DOMbootomFooter.style.display = 'none';
                    });

                    item.addEventListener('blur', function () {
                        DOMbootomFooter.style.display = 'block';
                        DOMbootomFooter.className = 'animated fadeIn';

                    });

                }
            }

        }

    }, false);
</script>